<!-- 竣工决算组件 -->
<template>
    <u-collapse-item @change="handleChange" :open="show">
        <uni-view slot="title" class="u-page__title">结决算审核信息</uni-view>
        <view :class="['content', !(index % 2) ? 'add-content' : '']" v-for="(item, index) in finalList" :key="index">
            <uni-view class="left-title">{{ item.label }} :</uni-view>
            <uni-view class="rigth_-title">{{ listObj[item.prop] }}</uni-view>
        </view>
    </u-collapse-item>
</template>

<script>
export default {
    name: "FinalAccounts",
    props: {
        prjId: {
            type: String,
            default: ''
        }
    },
    data() {
        return {
            finalList: [{
                label: "结算送审时间",
                prop: "jisSubTime"
            },
            {
                label: "结算审定时间",
                prop: "jisAppTime"
            },
            {
                label: "结算审定金额",
                prop: "jisAppInvest"
            },
            {
                label: "决算送审时间",
                prop: "jusSubTime"
            },
            {
                label: "决算审定时间",
                prop: "jusAppTime"
            },
            {
                label: "决算审定金额",
                prop: "jusAppInvest"
            }],//竣工决算列表label
            listObj: {},//列表数据
            show: true
        }
    },
    methods: {
        handleChange() {
            this.show = !this.show
        },
        async initqueryTFinInfo() {
            const { code, data } = await this.$axios.get('/settlement/tfinInfo/getAuditInfo', { prjId: this.prjId })
            if (+code === 200) {
                this.listObj = data
            }
        }
    },
    async created() {
        this.initqueryTFinInfo()
    }
}

</script>
<style>
@import "@/common/uView.css";
</style>
<style scoped lang='scss'>
.u-collapse-item {
    background-color: #fff;
}

.content {
    width: calc(100% - 40rpx);
    padding: 0 22rpx;
    color: #333333;
    height: 74rpx;
    margin-bottom: 20rpx;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 26rpx;
}

.add-content {
    background-color: #efefef;
}

.left-title {
    font-size: 32rpx;
    color: #333333;
}

.rigth_-title {
    // color: #666666;
    font-size: 28rpx;
    color: #333333;
}
</style>